package com.xlh.server.protocol.support.json;

import com.xlh.Utils.GsonManager;
import com.xlh.bean.ProtocolObject.Base;
import com.xlh.bean.ProtocolObject.RemoveExit;
import com.xlh.interf.IActivity;
import com.xlh.interf.ITakeMessage;

/**
 * // //903隐藏对应方向键
 * 删除所有出口
 * Created by mike@Q184377367 on 2018/7/2.
 */

public class RemoveExitServer implements ITakeMessage {

    private IActivity atv;
    private String hasType = "removeExit";
    private RemoveExit protccoObj;
    public RemoveExitServer(IActivity atv){
        this.atv = atv;
    }

    @Override
    public void takeMessage(String t,String s){

        if(!t.equals(this.hasType)) return;

        protccoObj =  GsonManager.gsmgr.jsonToAnyObject(s, RemoveExit.class);

        if(protccoObj==null || protccoObj.getExit().isEmpty()) return;
        this.atv.getActivity().getServerCommHelper().hideDirByValue(protccoObj.getExit());

    }

    @Override
    public boolean takeMessage(String s) {
        return false;
    }

    @Override
    public void init() {

    }

    @Override
    public void atViewLoadAfterInit() {

    }






}
